#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
#include <direct.h>

#include <windows.h>
#include <tchar.h>
#include <Eigen/Dense>
#include <algorithm>
#include <gdiplus.h>
#pragma comment(lib, "gdiplus.lib")
using namespace Eigen;

struct GRenderTarget
{
	void* pRenderBuffer;
	float* pZBuffer;
	unsigned char byBufferLen;
	unsigned short uWidth;
	unsigned short uHeight;
};

#define COLOR(r, g, b) ( ((r) << 16) + ((g) << 8) + (b) )
#define PI 3.14159265
#define EPSILON 1e-5f